<HTML>
<HEAD>
<meta NAME="author" CONTENT="Judit Vasko-Szedlar">
<link REL="stylesheet" TYPE="text/css" HREF="../../../marvinmanuals.css" TITLE="Style">

<TITLE>MarvinSpace demo</TITLE>

</HEAD>

<BODY>

<H1>MarvinSpace</H1>

<table align="center" cellspacing="0" cellpadding="5" border="0">
<tr><td>
<script language="JavaScript" src="../../../marvin.js"></script>
<script language="JavaScript">
<!--
mspace_name="MSpaceApplet";
mspace_begin(mspace_name,"../../..",400,400);
mspace_param("progressbar","true");
mspace_param("selectionpanel","false");
mspace_param("molecule","http://www.chemaxon.com/marvinspace/data/1ETS.mol");
mspace_end();
//-->
</script>
</td>

</tr>
</table>

<blockquote>
<br>
    The traditional way to put the MarvinSpace applet to a web page is by writing
the following text in the HTML:
    <pre>
    &lt;applet codebase="../../.."
        code="chemaxon/marvin/space/gui/MSpaceApplet" name="MSpaceApplet" width=400 height=400
        archive="mspace.jar,jmarvin.jar,jogl.jar"&gt;
    &lt;param name="progressbar" value="true"&gt;
    &lt;param name="selectionpanel" value="false"&gt;
    &lt;param name="molecule" value="http://www.chemaxon.com/marvinspace/data/1ETS.mol"&gt;
    &lt;/applet&gt;
    </pre>

Let's go through the special elements:
<ul>
    <li>
    The <code><b><strong>CODEBASE</strong></b></code> option specifies the directory of
    the Marvin binaries relative to the HTML file. This HTML file is in a
    subdirectory of the Marvin binaries directory, that's why we use
    "<code>../../..</code>" here.
    </li>
    <li>
        The <code><strong>ARCHIVE</strong></code> option is needed to speed up the
        downloads. The program code is packaged into compressed JAR files,
        <code>jmarvin.jar</code>, <code>mspace.jar</code> and <code>jogl.jar</code>.
    </li>
    <li>
        To indicate the loading the applet <code>progressbar</code> can be used.
    </li>
    <li>
        The applet parameter <code>selectionpanel</code> is used to embed a simple MarvinSpace applet without
        special GUI elements. However they can also be displayed, this will be discussed in
        <a href="gui.html">another example</a>.
        <!--link!-->
    </li>
    <li>
        The <code>molecule</code> applet parameter is an easy way to load molecule(s) by giving a
        location of the input or a SMILES string.
    </li>
</ul>

To correctly work with Sun's Java Plugin, <a HREF="../marvin.js.txt">marvin.js</a>
provides platform dependent solutions. Apart from the standard
<code><strong>&lt;applet&gt;</strong></code> tag, it uses
<code><strong>&lt;embed&gt;</strong></code> for Firefox (mozilla) and
<code><strong>&lt;object&gt;</strong></code> for Microsoft Internet Explorer.

The applet can be embedded in HTML pages using marvin.js the following way:
<pre>
<strong>&lt;script LANGUAGE</strong>=&quot;JavaScript&quot; <strong>SRC</strong>=&quot;../../../<a HREF="../marvin.js.txt">marvin.js</a>&quot;<strong>&gt;&lt;/script&gt;</strong>
<strong>&lt;script LANGUAGE</strong>=&quot;JavaScript&quot;<strong>&gt;</strong>
<strong>&lt;!--</strong>
<strong>mspace_name="MSpaceApplet"; <em>// naming the applet to allow JavaScript calls</em></strong>
<strong>mspace_begin(<strong>mspace_name</strong>,</strong>&quot;../../..&quot;<strong>,</strong> 400<strong>,</strong> 400<strong>);</strong> <em>// arguments: NAME, CODEBASE, WIDTH, HEIGHT</em>
<strong>mspace_param(<strong>&quot;progressbar&quot;</strong>,&quot;true&quot;);</strong>
<strong>mspace_param(<strong>&quot;selectionpanel&quot;</strong>,&quot;false&quot;);</strong>
<strong>mspace_param(<strong>&quot;molecule&quot;</strong>,&quot;http://www.chemaxon.com/marvinspace/data/1ETS.mol&quot;);</strong>
<strong>msspace_end();</strong>
<strong>//--&gt;</strong>
<strong>&lt;/script&gt;</strong>
</pre>

</blockquote>

<center><div class="lenia">&nbsp;</div></center>
<p>
<center>
<font size="-2" face="helvetica">

Copyright &copy; 2004-2010
<a href="http://www.chemaxon.com">ChemAxon Ltd.</a>
&nbsp;&nbsp;&nbsp;All rights reserved.
</font>
</center>

</BODY>
</HTML>


